<nav class="navbar navbar-default" role="navigation">
	  <div class="container-fluid">
	  	    <div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
				  <span class="sr-only">Toggle navigation</span>
				</button>
				<a class="navbar-brand" href="#">Brand</a>
    		</div>
	  
	  	<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul  class="nav navbar-nav">
				{foreach key=name item=link from=$headMenu}
					<li><a {if $link neq ''}href="{$link}"{/if} >{$name}</a>		
				{/foreach}
		        {if $logged}
		 
		            <li><a href="index.php?ctrl=Auth&act=logout" >Logout</a>        
		        {/if} 		
			</ul>
			
			<ul class="nav navbar-nav navbar-right">
			  <li><a href="{$backUrl}"><span class="glyphicon glyphicon-arrow-left"></span></a></li>
			  <li><a href="{$refreshUrl}"><span class="glyphicon glyphicon-refresh"></span></a></li>
			  {if $auth.logged}
			  <li class="dropdown">
			    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{$auth.uname} <span class="caret"></span></a>
			    <ul class="dropdown-menu" role="menu">
			      <li><a href="#">Profilo</a></li>
			      <li><a href="#">Impostazioni</a></li>
			      <li class="divider"></li>
			      <li><a href="index.php?ctrl=Auth&act=logout" >Logout</a> 
			    </ul>
			  </li>
			  {else}
			  <li>
			  	<form action="index.php?ctrl=AppDefault&act=login" method="post" class="navbar-form navbar-left">
			  		 <div class="form-group">
				  		<input type="text" size=10" name="username" value="{$username}" class="form-control" placeholder="Username">
				  		<input type="text" size=10 name="password" value="{$password}" class="form-control" placeholder="Password">
				  		<button type="submit" class="btn btn-default">Login</button>
			  		</div>
			  	</form>
			  </li>	
			  {/if}
			</ul>			
			
		</div>
	</div>	
</nav>